<template>
  <a-config-provider
    :locale="locale"
     :theme="themes"
  >
    <router-view />
  </a-config-provider>
</template>
<script setup>
import { theme } from 'ant-design-vue';
import zhCN from "ant-design-vue/es/locale/zh_CN";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import themes from "@/themes";
dayjs.locale("zh-cn");
const { darkAlgorithm, compactAlgorithm } = theme;
document.documentElement.style.setProperty('--colorBgBase', themes.token.colorBgBase);
document.documentElement.style.setProperty('--colorBgLayout', themes.token.colorBgLayout);
document.documentElement.style.setProperty('--color-border', themes.token.colorBorder);
document.documentElement.style.setProperty('--colorBgContainer', themes.token.colorBgContainer);
document.documentElement.style.setProperty('--colorBgContainerHover', themes.token.colorBgContainerHover);
document.documentElement.style.setProperty('--colorBorder', themes.token.colorBorder);

Object.keys(themes.token).forEach(key => {
  document.documentElement.style.setProperty(`--${key}`, themes.token[key]);
});
Object.keys(themes.components).forEach(key => {
  Object.keys(themes.components[key]).forEach(k => {
    document.documentElement.style.setProperty(`--${key}-${k}`, themes.components[key][k]);
  });
});

const locale = ref(zhCN);

// import Ca from "@/utils/ca";

// console.log(Ca(), 'ca==')
</script>
<style lang="scss">
body {
  margin: 0;
  background: var(--colorBgLayout);
}
</style>